<?php

namespace App\Exceptions;

/**
 * Class ApiException
 *
 * @package App\Exceptions
 */
class ApiException extends BaseException
{
	protected int $baseCode = self::BASE_CODE_OF_API;

	const CODE_1001 = 1001;
	const CODE_1101 = 1101;

	const CODE_2028 = 2028;
	const CODE_2029 = 2029;


	protected array $showMsg = [
		self::CODE_1001 => 'API参数错误',
		self::CODE_1101 => '内容含敏感词',
		self::CODE_2028 => '请求超时', // 请求第三方超时
		self::CODE_2029 => '请求失败', // 请求第三方接口成功：code码非200
	];

	function __construct($msg = '', $code = 0)
	{
		parent::__construct($msg, $code);
	}
}